<?php
session_start();
//if (!isset($_SESSION['logueado']) || $_SESSION['logueado'] == null) {
//    include_once("dialog_login.php");
//} else {
header("Content-Type: text/html; charset=utf-8");
$tweet_id = $_REQUEST['tweet_id'];
?>
<!DOCTYPE html> 
<html> 
    <head>
        <meta charset="utf-8">
        <title>A&ntilde;ade un comentario</title>
    </head> 
    <body> 
        <div data-role="page">
            <div data-role="header" data-theme="d">
                <h1>Comenta</h1>
            </div>
            <div data-role="content" data-theme="c">
                <div id="error_msg" name="error_msg" style="color: red; text-align: center; display: none">
                    Ha habido un error al enviar el comentario. Int&eacute;ntelo de nuevo.
                </div>
                <form action="check_tweet.php" method="post">
                    <div data-role="fieldcontain">
                        <input type="hidden" name="tweet_id" id="tweet_id" value="<?php print $tweet_id; ?>" />
                        <label for="user">Tu nombre:</label>
                        <input type="text" name="user" id="user" value=""  />
                        <label for="comment">Env&iacute;e un comentario:</label>
                        <textarea name="comment" id="comment" ></textarea>
                        <button data-theme="b" onclick="submit_comment(<?php print $tweet_id; ?>)" id="submiter" name="submiter">Enviar</button>
                    </div>
                </form>
            </div>
        </div>
    </body>
</html>

<?php
//} ?>